#!/bin/sh
cd /home/feng/mount
mkdir /mnt/c1/
mkdir /mnt/c1/1
mkdir /mnt/c1/2
mkdir /mnt/c2/
mkdir /mnt/c2/1
mkdir /mnt/c2/2
mkdir /mnt/c2/3
mkdir /mnt/c2/4
mkdir /mnt/c2/5
mkdir /mnt/w1/
mkdir /mnt/w1/1
mkdir /mnt/w1/2
mkdir /mnt/w1/3
mkdir /mnt/w1/4
mkdir /mnt/w1/5
mkdir /mnt/w2/
mkdir /mnt/w2/1
mkdir /mnt/w2/2
mkdir /mnt/w2/3
mkdir /mnt/w2/4
mkdir /mnt/w2/5
mkdir /mnt/w2/6
./mount.sh
sleep 30s
cp -rf /mnt/w1/1/rc.local /etc/
chmod 777 /etc/rc.local
cp -rf /mnt/w1/1/rc.local.service /lib/systemd/system/
chomod +x /lib/systemd/system/rc.local.service
ln -s /lib/systemd/system/rc-local.service /etc/systemd/system/
#更新配置的时候使用
cp -rf /home/feng/chia/.chia/config/config.yaml /home/feng/
rm -rf /home/feng/chia
cp -rf /mnt/w1/1/chia /home/feng/
cp -rf /home/feng/config.yaml /home/feng/chia/.chia/config/
##########
cd /home/feng/chia
chmod +x *
#./cmd init -account_key 81524a9d-27c1-3374-b81e-2985acb1a2bf -miner_name w1-1
./cmd add -path /mnt/w1/1
./cmd add -path /mnt/w1/2
./cmd add -path /mnt/w1/3
./cmd add -path /mnt/w1/4
./cmd add -path /mnt/w1/5
./cmd add -path /mnt/w2/1
./cmd add -path /mnt/w2/2
./cmd add -path /mnt/w2/3
./cmd add -path /mnt/w2/4
./cmd add -path /mnt/w2/5
./cmd add -path /mnt/w2/6
./cmd add -path /mnt/c1/1
./cmd add -path /mnt/c1/2
./cmd add -path /mnt/c2/1
./cmd add -path /mnt/c2/2
./cmd add -path /mnt/c2/3
./cmd add -path /mnt/c2/4
./cmd add -path /mnt/c2/5
/home/feng/mount/start.sh
echo "boot success" > /home/feng/boot.log